package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.CategoryDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.BaseCategory3;
import com.atguigu.tingshu.model.album.BaseCategoryView;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album", fallback = CategoryDegradeFeignClient.class)
public interface CategoryFeignClient {
    /**
     * 根据三级分类id查询分类数据
     * @author Petrichor
     * @date 2023/12/26 20:46
     * @param c3Id Category3Id 专辑三级分类id
     * @return BaseCategoryView 分类视图 一二三级分类的id和名称
    **/
    @GetMapping(value = "/api/album/category/findCategoryByC3Id/{c3Id}")
    public Result<BaseCategoryView> findCategoryByC3Id(@PathVariable(value = "c3Id") Long c3Id) ;
    /**
     * @description: 根据一级分类id查询置顶三级分类
     * @author Petrichor
     * @date 2023/12/27 22:39
     * @param category1Id 一级分类id
     * @return 三级分类集合
     **/
    @GetMapping(value = "/api/album/category/findTopBaseCategory3/{category1Id}")
    public Result<List<BaseCategory3>> findTopBaseCategory3(@PathVariable(value = "category1Id") Long category1Id) ;
}